import axios from 'axios'
import {Toast} from 'antd-mobile'

axios.interceptors.request.use(function(config){
    // 显示loading
    Toast.loading('加载中...',0)

    return config
}, function (error) {
    return Promise.reject(error)
})

axios.interceptors.response.use(function(response){

        Toast.hide()    

    return response.data
}, function (error) {
    return Promise.reject(error)
})

export default axios